<div id="share-window">
  <a class="close-widget" href="#">x</a>

    <img src="/images/spreeconf-nyc-2014-badge.jpg" alt="Spree Conf NYC 2014">

    <h4 class="title">Want to learn more about Spree?</h4>
  <p>
    Early Bird is 50% Off (Ends 12/31)
  </p>
  <a href="http://spreeconf.com" target="_blank" class="button">Learn More</a>
</div>

<style>
  #share-window * {
      font-family: 'futura-pt', serif !important;
      color: #fff;
  }

  #share-window img {
    position: absolute;
    left: 0;
    z-index: 0;
  }

  #share-window {
    position: fixed;
    bottom: -450px;
    margin-left: 720px;
    width: 250px;
    height: 400px;    
    background-color: #0a0a0a;
    text-align: center;
    z-index: 1;
    line-height: 28px;
  }

  #share-window .close-widget {
      position: absolute;
      right: 10px;
      top: 5px;
      font-size: 30px;
      color: white;
      text-decoration: none;
      z-index: 2;
  }

  #share-window h1, #share-window h4 {
      font-weight: normal;
      margin-bottom: 0;
      position: absolute;
      z-index: 2;
  }

  #share-window h1 {
      font-size: 28px;
      line-height: 35px;
      position: absolute;
      z-index: 2;
  }

  #share-window a.button {    
    border: 3px solid white;
    position: absolute;
    top: 320px;
    color: #FFF;
    padding: 10px 30px 8px;
    font-size: 16px;
    text-decoration: none;
    text-transform: uppercase;
    background-color: transparent;
    width: 200px;
    left: 25px;
    border-radius: 0;
  }

  #share-window a.button:hover {
    background-color: white;
    color: #0a0a0a !important;
  }

  #share-window p, #share-window p strong {
      margin-top: 10px;
      color: #D96657;
      margin-bottom: 0;
  }

  #share-window h2, #share-window h3 {
    margin: 0;
    border: none;
    line-height: 28px;
  }

  #share-window h3 {
      margin-top: 0;
      padding-top: 0;
  }

  #share-window h4 {
    font-size: 16px;
    padding-top: 0;
    margin-bottom: 10px;
    margin-top: 0;
    font-weight: 500;
    text-transform: uppercase;
    top: 260px;
    line-height: 25px;
  }
</style>

<script>
  $(function(){

    var sc_banner_state = $.cookie('sc_nyc_2014_banner_state');

    if (new Date().valueOf() < new Date('2014/02/27').valueOf()) {
      if(sc_banner_state != 'closed') {
        var widget = $("#share-window");

        $("#share-window a.close-widget").click(function(e){
          e.preventDefault();
          widget.animate({
            bottom: "-400px",
            opacity: 0
          }, 1000);
          $.cookie('sc_nyc_2014_banner_state', 'closed', { path: '/' });
        });

        $(window).scroll(function(){
          if($.browser.webkit) {
            var scroll_top = $('body').scrollTop();
          }
          else {
            var scroll_top = document.documentElement.scrollTop;
          }
          if(scroll_top > $(window).height()){
            widget.animate({
              bottom: "-5px"
            });
            $(window).unbind('scroll');
          }
        });
      }
    }
  });
</script>
